import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { BookModule } from './book/book.module';
import { SequelizeModule } from '@nestjs/sequelize';
import { Book } from './book/book.model';

@Module({
  imports: [BookModule,
    SequelizeModule.forRoot({
        dialect: 'mysql',
        host: '',
        port: 3306,
        username: 'nest',
        password: '',
        database: 'nest',
        // autoLoadModels: true,
        // synchronize: true,
        models: [Book],
    })
],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule {}
